package day13.thread05;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @author Xiao
 * @date 2021/8/6
 */
public class Test {
    /**
     * 阻塞队列实现等待唤醒机制
     */
    public static void main(String[] args) {
        ArrayBlockingQueue<String> abq = new ArrayBlockingQueue<>(1);
        Cooker c = new Cooker(abq);
        Foodie f = new Foodie(abq);
        Thread tc = new Thread(c);
        Thread tf = new Thread(f);
        tc.start();
        tf.start();
    }
}
